package com.financing.platform.dao.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IProductCheckLogDao;
import com.financing.platform.dto.ProductCheckLogDTO;
import com.financing.platform.util.SqlName;
/**
 * product_check_log  
 *  数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("productCheckLogDao")
public class ProductCheckLogDaoImpl extends BaseDaoImpl implements IProductCheckLogDao {


	@Override
	public int insert(ProductCheckLogDTO productCheckLog) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.ProductCheckLogSql.insert, productCheckLog);
	}

	@Override
	public void update(ProductCheckLogDTO productCheckLog) throws SQLException {
		this.sqlMapClient.update(SqlName.ProductCheckLogSql.update, productCheckLog);
	}

	@Override
	public void updateForce(ProductCheckLogDTO productCheckLog) throws SQLException {
		this.sqlMapClient.update(SqlName.ProductCheckLogSql.updateForce, productCheckLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClient.delete(SqlName.ProductCheckLogSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<ProductCheckLogDTO> queryList(ProductCheckLogDTO productCheckLog) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.ProductCheckLogSql.queryList, productCheckLog);
	}

	@Override
	public int queryListCount(ProductCheckLogDTO productCheckLog) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.ProductCheckLogSql.queryListCount, productCheckLog);
	}

	@Override
	public ProductCheckLogDTO loadById(Integer id) throws SQLException {
		return  (ProductCheckLogDTO)this.sqlMapClient.queryForObject(SqlName.ProductCheckLogSql.loadById,id);
	}

}
